<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ attribute name="name" required="true" rtexprvalue="true" description="Name of corresponding property in bean object"%>
<%@ attribute name="id" required="false" rtexprvalue="true"%>
<%@ attribute name="label" required="false" rtexprvalue="true"%>
<%@ attribute name="placeHolder" required="false" rtexprvalue="true"%>
<%@ attribute name="readonly" required="false" rtexprvalue="true"%>

<spring:bind path="${name}">
	<div class="form-group${status.error ? ' has-error has-feedback' : ''}">
		<label class="sr-only" for="${name}">${label}</label>
		<div class="input-group">
			<div class="input-group-addon">${label}</div>
			<form:password cssClass="form-control" id="${id}" path="${name}" placeHolder="${placeHolder}" readonly="${readonly}" />
			<form:errors path="${name}" cssClass="text-danger input-group-addon" />
		</div>
	</div>
</spring:bind>